package com.graduate.work.graduatework.service;

import com.graduate.work.graduatework.entity.User;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author: cuibingqi.
 * @date: 17/5/3 下午4:29.
 * @descripe:
 */
@Service
public class UserloginService {

    @Autowired
    private DataAcessService dataAcessService;

    /**
     * 用户注册
     * @param user
     * @return
     */
    public boolean registe(User user){

        boolean result = dataAcessService.userRegister(user);

        return result;
    }
    public User login(String userId,String password){

        User user = dataAcessService.userLogin(userId,password);

        return user;
    }
}
